using SharpPieces.Web.Controls;
using System;
using System.Web.UI;

namespace SharpPieces.DemoApp
{

    public partial class uploadfunctionality : Page
    {
        /// <summary>
        /// Handles the FileReceived event of the upload control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="SharpPieces.Web.Controls.UploadEventArgs"/> 
        /// instance containing the event data.</param>
        protected void upload_FileReceived(object sender, UploadEventArgs e)
        {
            if (e.File != null)
            {
                string savePath = Server.MapPath("App_Temp");
                // Due to security issues, the save action itself is blocked in this demo.
                //e.File.SaveAs(savePath + "\\" + e.File.FileName);
            }
        }
    }

}
